# coding=utf-8
"""
Author: Mr.夏末
@Function: 九九乘法表
"""

y = 1
while y < 10:
    # 循环体：外层循环每循环一次，循环体都要跑一整套
    x = 1
    while x < 10:
        if x <= y:
            # end='\t',输出后，不输出换行，而是输出一个tab键
            print(x, "*", y, "=", x * y, end='\t')
        x += 1
    print()
    y += 1

print("--------------------------------------------------")

for y in range(1, 10):
    for x in range(1, 10):
        if x <= y:
            print(x, "*", y, "=", x * y, end='\t')
    print()

print("--------------------------------------------------")

y = 1
while y < 10:
    for x in range(1, 10):
        if x <= y:
            print(x, "*", y, "=", x * y, end='\t')
    print()
    y += 1

print("--------------------------------------------------")

y = 1
while y < 10:
    for x in range(1, 10):
        if (x == y) or (x + y == 10):
            print('\t\t', end='\t')
        else:
            print(x, "*", y, "=", x * y, end='\t')
    print()
    y += 1

print("--------------------------------------------------")

loginname= input("输入用户名：")
password = input("输入密码：")
if loginname and password and 6 <= len(loginname) < 17 and 6 <= len(password) < 17:
    print("用户名密码合法")
else:
    print("用户名密码不合法")